Repository navigation
Conversation
Adds a `jobs` namespace to `TinybirdClient` (and standalone API
functions in `src/api/jobs.ts`) wrapping `/v0/jobs`, so the SDK can
inspect and manage the async jobs it triggers (ingest/append/replace,
connector syncs) instead of only firing them.
- `client.jobs.list({ status?, kind? })` -> GET /v0/jobs
- `client.jobs.get(jobId)` -> GET /v0/jobs/{job_id}
- `client.jobs.cancel(jobId)` -> POST /v0/jobs/{job_id}/cancel
`retry` was intentionally left out: there is no confirmed
`/v0/jobs/{job_id}/retry` endpoint. The installed Forward CLI client
(tinybird/tb/client.py) only implements `jobs()`, `job()` and
`job_cancel()`, and the CLI's `tb job` command group has no `retry`
subcommand (only `ls`, `details`, `cancel`). A grep of platform-api
found no `/v0/jobs/.../retry` route, and the sibling Python SDK ticket
(PROTM-2264) has no related work in its git history. Shipping a
`retry()` that calls a nonexistent endpoint would be worse than
leaving it out, so it's scoped out pending backend confirmation.
Refs PROTM-2270
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
jalbertsr
approved these changes
Oct 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
jobsnamespace toTinybirdClient(and standalone functions insrc/api/jobs.ts) wrapping Tinybird's/v0/jobsendpoints, so the SDK can inspect and manage the async jobs it triggers (ingest/append/replace, connector syncs) instead of only firing them — bringing parity withtb job ls/details/cancel.Linear: https://linear.app/tinybird/issue/PROTM-2270/typescript-sdk-add-job-management-api-listgetcancelretry
client.jobs.list({ status?, kind? })→GET /v0/jobsclient.jobs.get(jobId)→GET /v0/jobs/{job_id}client.jobs.cancel(jobId)→POST /v0/jobs/{job_id}/cancelNew files:
src/api/jobs.ts(raw API layer, following thesrc/api/branches.tspattern — aJobApiConfig+JobApiError+ standalone functions using the shared fetcher) andsrc/client/jobs.ts(JobsNamespace, mirroringTokensNamespaceexactly), wired intoTinybirdClientinsrc/client/base.ts, with types/functions exported fromsrc/index.ts.retrywas scoped outThe ticket description mentions
tb job ... retry, but I could not confirm a real/v0/jobs/{job_id}/retrybackend endpoint exists:tinybird/tb/client.pyin the Python SDK's venv) only implementsjobs(),job(), andjob_cancel()— no retry method.tb jobcommand group (tinybird/tb/modules/job.py) only definesls,details, andcancelsubcommands — there is notb job retrycommand at all.platform-apifor job retry routes/handlers (/retry,retry_job,job_id.*retry) turned up nothing beyond unrelated HTTP-client retry logic.tinybird-sdk-python's git history to cross-check against.Given this, I implemented
list/get/cancelonly rather than ship aretry()call against an endpoint that may not exist. If a retry endpoint does exist, it should be added as a follow-up once confirmed.Test plan
pnpm typecheckpassespnpm test:runpasses (1082 tests, including newsrc/api/jobs.test.tsandsrc/client/jobs.test.ts)fetchoverride, 404 handling, and generic error-body propagationCHANGELOG.mdandpackage.jsonversion intentionally left untouched per repo convention🤖 Generated with Claude Code